<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div id="div1">
    aaa
    <div id="div2">
        bbb
        <div id="div3">
            ccc

        </div>
    </div>
</div>
<script>
    var div1 = document.getElementById('div1');
    var div2 = document.getElementById('div2');
    var div3 = document.getElementById('div3');

    div1.addEventListener('click',function(e){
        alert('aa')
    })
    div2.addEventListener('click',function(e){
        alert('bb')
    })
    div3.addEventListener('click',function(e){
        e.stopPropagation();
        alert('cc')
    })
</script>
</body>
</html>